package com.zlm.mall.ware.feign;

import com.zlm.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: 郑
 *
 * feign
 * 1). feign发送到网关
 *      1. @FeignClient("mall-gateway") 给mall-gateway所在的机器
 *      2 @RequestMapping("/api/skuinfo/info/{skuId})
 * 2). 直接请求后台
 *      1. @FeignClient("mall-product")
 *      2 @RequestMapping("/skuinfo/info/{skuId})
 */
@FeignClient("mall-product")
public interface ProductFeignService {

    /**
     * sku信息
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
